Conflict-aware optimal scheduling of prioritised code clone refactoring

نویسندگان

  • Minhaz Fahim Zibran
  • Chanchal Kumar Roy
چکیده

Duplicated or similar source code, also known as code clones, are possible malicious ‘code smells’ that may need to be removed through refactoring to enhance maintainability. Among many potential refactoring opportunities, the choice and order of a set of refactoring activities may have distinguishable effect on the design/code quality measured in terms of software metrics. Moreover, there may be dependencies and conflicts among those refactorings of different priorities. Addressing all the conflicts, priorities and dependencies, a manual formulation of an optimal refactoring schedule is very expensive, if not impossible. Therefore an automated refactoring scheduler is necessary to ‘maximise benefit and minimise refactoring effort’. However, the estimation of the efforts required to perform code clone refactoring is a challenging task. This study makes two contributions. First, the authors propose an effort model for the estimation of code clone refactoring efforts. Second, the authors propose a constraint programming (CP) approach for conflict-aware optimal scheduling of code clone refactoring. A qualitative evaluation of the effort model from the developers’ perspective suggests that the model is complete and useful for code clone refactoring effort estimation. The authors also quantitatively compared their refactoring scheduler with other wellknown scheduling techniques such as the genetic algorithm, greedy approaches and linear programming. The authors’ empirical study suggests that the proposed CP-based approach outperforms other approaches they considered.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Conflict-aware schedule of software refactorings

Software refactoring is to restructure the internal structure of object-oriented software to improve software quality, especially maintainability, extensibility and reusability while preserving its external behaviours. According to predefined refactoring rules, we may find many places in the software where refactorings can be applied. Applying each refactoring, we may achieve some effect (quali...

متن کامل

Investigating Intentional Clone Refactoring

Software clone refactoring has been studied from many perspectives, including empirical research on clone refactoring history, IDE support for tracking clone change, and recommendation systems for clone management. Most of the work relies on having access to and being able to analyze the history of clone refactoring. However, refactoring cloned code is not equivalent to clone management, as cod...

متن کامل

Implication of Clone Detection and Refactoring Techniques using Delayed Duplicate Detection Refactoring

Code maintenance has been increased when the similar code fragments is reduced in the software systems. Refactoring is a change made to the internal structure of software to make it easier to understand and cheaper to modify without changing its observable behavior based on code, the refactoring mechanism is used to discover the clone detection. The proposed algorithm insists semantic relevance...

متن کامل

Sub-clones: Considering the Part Rather than the Whole

Researchers have proposed various automated clone detection tools that can assist programmers in finding code clones (i.e., duplicated sections of code). Such tools can serve as input into the process of clone removal through refactoring activities. In this paper, we consider the scenario in which an automated clone detection tool was used to find code clones as part of the clone refactoring pr...

متن کامل

A JOINT DUTY CYCLE SCHEDULING AND ENERGY AWARE ROUTING APPROACH BASED ON EVOLUTIONARY GAME FOR WIRELESS SENSOR NETWORKS

Network throughput and energy conservation are two conflicting important performance metrics for wireless sensor networks. Since these two objectives are in conflict with each other, it is difficult to achieve them simultaneously. In this paper, a joint duty cycle scheduling and energy aware routing approach is proposed based on evolutionary game theory which is called DREG. Making a trade-off ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • IET Software

دوره 7  شماره 

صفحات  -

تاریخ انتشار 2013